package avicti.bdp.dto.org;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

import javax.validation.constraints.Pattern;

import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class OrganizationBriefDTO implements Serializable {
	private static final long serialVersionUID = 1L;

	public OrganizationBriefDTO() {
		managementSubordinates = new ArrayList<OrganizationBriefDTO>();
		propertySubordinates = new ArrayList<OrganizationBriefDTO>();
	}

	/**
	 * ID
	 */

	private String id;

	/**
	 * 管理上级ID
	 */
	private String managementSuperiorId;
	/**
	 * 管理下级
	 */
	private List<OrganizationBriefDTO> managementSubordinates;

	/**
	 * 产权上级ID
	 */
	private String propertySuperiorId;
	/**
	 * 产权下级
	 */
	private List<OrganizationBriefDTO> propertySubordinates;

	/**
	 * 注册全称
	 */
	@NotBlank(message = "注册全称不能为空")
	private String registeredFullName;

	/**
	 * 统一社会信用代码
	 */
	@Length(max = 18, min = 18, message = "统一社会信用代码 需18位")
	@Pattern(regexp = "^[0-9A-Za-z]{18}$", message = "统一社会信用代码 需由数字或字母组成")
	private String unifiedSocialCreditIdentifier;

	/**
	 * 组织机构代码
	 */
	@NotBlank(message = "组织机构代码不能为空")
	private String organizationCode;

	/**
	 * 集团单位代码
	 */
	@NotBlank(message = "集团单位代码不能为空")
	private String groupUnifiedUnitCode;

	/**
	 * 中文全称
	 */
	private String chineseFullName;

	/**
	 * 中文简称
	 */
	private String chineseAbbrName;

	/**
	 * 英文全称
	 */
	private String englishFullName;

	/**
	 * 英文简称
	 */
	private String englishAbbrName;

	/**
	 * 集团内部管理属性
	 */
	private String groupInternalManagementType;

	/**
	 * 管理层级
	 */
	@NotBlank(message = "管理层级不能为空")
	private Integer managementLevel;

	/**
	 * 同级排序号
	 */
	@Pattern(regexp = "^[0-9]*$", message = "同级排序号 必须为整数")
	private Integer siblingOrderNumber;

	/**
	 * 组织产权级次
	 */
	@NotBlank(message = "组织产权级次不能为空")
	private Integer propertyManagementLevel;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getManagementSuperiorId() {
		return managementSuperiorId;
	}

	public void setManagementSuperiorId(String managementSuperiorId) {
		this.managementSuperiorId = managementSuperiorId;
	}

	public List<OrganizationBriefDTO> getManagementSubordinates() {
		return managementSubordinates;
	}

	public void setManagementSubordinates(List<OrganizationBriefDTO> managementSubordinates) {
		this.managementSubordinates = managementSubordinates;
	}

	public String getPropertySuperiorId() {
		return propertySuperiorId;
	}

	public void setPropertySuperiorId(String propertySuperiorId) {
		this.propertySuperiorId = propertySuperiorId;
	}

	public List<OrganizationBriefDTO> getPropertySubordinates() {
		return propertySubordinates;
	}

	public void setPropertySubordinates(List<OrganizationBriefDTO> propertySubordinates) {
		this.propertySubordinates = propertySubordinates;
	}

	public String getRegisteredFullName() {
		return registeredFullName;
	}

	public void setRegisteredFullName(String registeredFullName) {
		this.registeredFullName = registeredFullName;
	}

	public String getUnifiedSocialCreditIdentifier() {
		return unifiedSocialCreditIdentifier;
	}

	public void setUnifiedSocialCreditIdentifier(String unifiedSocialCreditIdentifier) {
		this.unifiedSocialCreditIdentifier = unifiedSocialCreditIdentifier;
	}

	public String getOrganizationCode() {
		return organizationCode;
	}

	public void setOrganizationCode(String organizationCode) {
		this.organizationCode = organizationCode;
	}

	public String getGroupUnifiedUnitCode() {
		return groupUnifiedUnitCode;
	}

	public void setGroupUnifiedUnitCode(String groupUnifiedUnitCode) {
		this.groupUnifiedUnitCode = groupUnifiedUnitCode;
	}

	public String getChineseFullName() {
		return chineseFullName;
	}

	public void setChineseFullName(String chineseFullName) {
		this.chineseFullName = chineseFullName;
	}

	public String getChineseAbbrName() {
		return chineseAbbrName;
	}

	public void setChineseAbbrName(String chineseAbbrName) {
		this.chineseAbbrName = chineseAbbrName;
	}

	public String getEnglishFullName() {
		return englishFullName;
	}

	public void setEnglishFullName(String englishFullName) {
		this.englishFullName = englishFullName;
	}

	public String getEnglishAbbrName() {
		return englishAbbrName;
	}

	public void setEnglishAbbrName(String englishAbbrName) {
		this.englishAbbrName = englishAbbrName;
	}

	public String getGroupInternalManagementType() {
		return groupInternalManagementType;
	}

	public void setGroupInternalManagementType(String groupInternalManagementType) {
		this.groupInternalManagementType = groupInternalManagementType;
	}

	public Integer getManagementLevel() {
		return managementLevel;
	}

	public void setManagementLevel(Integer managementLevel) {
		this.managementLevel = managementLevel;
	}

	public Integer getSiblingOrderNumber() {
		return siblingOrderNumber;
	}

	public void setSiblingOrderNumber(Integer siblingOrderNumber) {
		this.siblingOrderNumber = siblingOrderNumber;
	}

	public Integer getPropertyManagementLevel() {
		return propertyManagementLevel;
	}

	public void setPropertyManagementLevel(Integer propertyManagementLevel) {
		this.propertyManagementLevel = propertyManagementLevel;
	}

	// add by huyong
	@JsonIgnore
	public java.lang.String getSocialCreditIdentifier() {
		return unifiedSocialCreditIdentifier;
	}

	public void setSocialCreditIdentifier(java.lang.String unifiedSocialCreditIdentifier) {
		this.unifiedSocialCreditIdentifier = unifiedSocialCreditIdentifier;
	}

	@JsonIgnore
	public String getGroupInternalManagementTypeName() {
		return groupInternalManagementType;
	}

	public void setGroupInternalManagementTypeName(String groupInternalManagementType) {
		this.groupInternalManagementType = groupInternalManagementType;
	}

	@JsonIgnore
	public java.lang.String getGroupInternalType() {
		return groupInternalManagementType;
	}

	public void setGroupInternalType(java.lang.String groupInternalManagementType) {
		this.groupInternalManagementType = groupInternalManagementType;
	}


}
